package xjh.him.netty.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import xjh.him.entity.User;

public class UserDto {
    // request
    @Data
    public static class RegisterReq {
        String phone;
        String password;
        String nickname;
    }

    @Data
    public static class LoginReq {
        String phone;
        String password;
    }


    // response
    @Data
    public static class RegisterResp {
        xjh.him.entity.User user;
        String token;
    }

    @Data
    public static class LoginResp {
        xjh.him.entity.User user;
        String token;
    }

    @Data
    public static class SelectByUserIdReq {
        Integer userId;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SelectByUserIdResp {
        User user;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SelectByPhoneReq {
        String phone;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SelectByPhoneResp {
        User user;
    }
}